package com.zz.bsea.homeowrkexample;

public class UserService {
	/**
	 * 登录
	 * @param name
	 * @param password
	 * @return
	 */
	public boolean login(String name,String password) {
		boolean rs=false;
		if("admin".equals(name)&&"123".equals(password)) {
			rs=true;
		}
		return  rs;
	}
	/**
	 * 注册
	 * @param name
	 * @param password
	 * @return
	 */
	public User register(String name,String password) {
		User user=new User();
		user.setName(name);
		user.setPassword(password);
		return user;
	}

}
